<?php

/**
 * Description of Editpegawai
 *
 * @author DENY PRASETIA TW
 * http://denyprasetiatw.blogspot.com/
 * Created Feb 10, 2012 - 7:26:50 PM
 */

if($this->session->userdata('s_hakakses') != "1"){
    redirect();
} else if($this->session->userdata('s_hakakses') == NULL){
    redirect();
}

$hakakses = array(
    1 => 'Tata Usaha', 
    2 => 'Kepala Balai',
    3 => 'Unit Kerja'
);

$status = array(
    1 => 'Aktif', 
    2 => 'Non Aktif'
);

foreach ($datapegawai as $row){
//    echo $row->IDPEGAWAI;
//    echo $row->NAMAPEGAWAI;
//    echo $row->PASSWORD;
//    echo $row->HAKAKSES;

?>


    <div align="center">
        <h1>Registrasi Pegawai</h1>
        <?php echo form_open('Site/validasiSimpanEditDataPegawai'); ?>
        <table width="200" border="0" cellpadding="5">
          <tr>
            <td width="96"></td>
            <td width="8"></td>
            <td width="80"></td>
          </tr>
          <tr>
            <td>IDPEGAWAI</td>
            <td>:</td>
            <td><?php echo form_input('i_idpegawai', $row->IDPEGAWAI).form_error('i_idpegawai'); ?></td>
          </tr>
          <tr>
            <td>NAMAPEGAWAI</td>
            <td>:</td>
            <td><?php echo form_input('i_namapegawai', $row->NAMAPEGAWAI).form_error('i_namapegawai'); ?></td>
          </tr>
          <tr>
            <td>PASSWORD</td>
            <td>:</td>
            <td><?php echo form_input('i_password', $row->PASSWORD).form_error('i_password'); ?></td>
          </tr>
          <tr>
            <td>HAKAKSES</td>
            <td>:</td>
            <td>
                <?php echo form_dropdown('i_hakakses', $hakakses, $row->HAKAKSES); ?>
            </td>
          </tr>
          <tr>
            <td>STATUS</td>
            <td>:</td>
            <td>
                <?php echo form_dropdown('i_statuspegawai', $status, $row->STATUSPEGAWAI); ?>
            </td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td><?php echo form_submit('i_registrasi', ' Save '); ?></td>
          </tr>
          <tr>
              <td></td>
              <td></td>
              <td></td>
          </tr>
        </table>
        <?php echo form_close(); ?>
    </div>
<?php } ?>